package com.bjsxt.userCenter.users.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.bjsxt.userCenter.users.pojo.AAdmins;
import com.bjsxt.userCenter.users.pojo.ARole;
import com.bjsxt.usercenter.common.util.PageInfoUtil;

/**
 * 用户相关的service
 * 持有多和Dao
 * @author Administrator
 *
 */
public interface IUserService
{
	/**
	 * 查询一条管理员
	 * @param condMap
	 * @return
	 */
	AAdmins findOneAdminsService(Map<String, Object> condMap);
	
	/**
	 * 查询一条管理员
	 * @param condMap
	 * @return
	 */
	List<AAdmins> findListAdminsService(PageInfoUtil pageInfoUtil, Map<String, Object> condMap);
	
	/**
	 * 添加一条管理员
	 * @param admins
	 * @return json:{"code":"0","info":"成功","data":{"effect":"","id":""}}
	 */
	JSONObject saveAdminsService(AAdmins admins);
	
	
	/**
	 * 更新一条管理员
	 * @param admins
	 * @return json:{"code":"0","info":"成功","data":{"effect":"","id":""}}
	 */
	JSONObject updateAdminsService(AAdmins admins);
	
	/**
	 * 删除一条管理员
	 * @param admins
	 * @return json:{"code":"0","info":"成功","data":{"effect":"","id":""}}
	 */
	JSONObject deleteAdminsService(AAdmins admins);
    
	
	
	/*==============================ROLE=======================================*/
	
	
	
	/**
	 * 查询一条角色
	 * @param condMap
	 * @return
	 */
	ARole findOneRoleService(Map<String, Object> condMap);
	
	/**
	 * 查询一条角色
	 * @param condMap
	 * @return
	 */
	List<ARole> findListRoleService(PageInfoUtil pageInfoUtil, Map<String, Object> condMap);
	
	/**
	 * 添加一条角色
	 * @param Role
	 * @return json:{"code":"0","info":"成功","data":{"effect":"","id":""}}
	 */
	JSONObject saveRoleService(ARole role);
	
	
	/**
	 * 更新一条角色
	 * @param Role
	 * @return json:{"code":"0","info":"成功","data":{"effect":"","id":""}}
	 */
	JSONObject updateRoleService(ARole role);
	
	/**
	 * 删除一条角色
	 * @param Role
	 * @return json:{"code":"0","info":"成功","data":{"effect":"","id":""}}
	 */
	JSONObject deleteRoleService(ARole role);
}
